#define N 100

const int p1 = 2;  // pin for measure
const int p2 = 3;
const int p3 = 4;
const int p4 = 5;
const int p5 = 6;
const int p6 = 7;
const int p7 = A1;
const int p8 = 9;
const int p9 = 10;

void setup() {
  pinMode(p1, INPUT);
  pinMode(p2, INPUT);
  pinMode(p3, INPUT);
  pinMode(p4, INPUT);
  pinMode(p5, INPUT);
  pinMode(p6, INPUT);
  pinMode(p7, INPUT);
  pinMode(p8, INPUT);
  pinMode(p9, INPUT);

  Serial.begin(115200);
}


byte val1[N];
byte val2[N];
byte val3[N];
byte val4[N];
byte val5[N];
byte val6[N];
//byte val7[N];
//byte val8[N];
//byte val9[N];

void loop() {
  for (int i=0; i<N; i++) {
    val1[i] = digitalRead(p1);
    val2[i] = digitalRead(p2);
    val3[i] = digitalRead(p3);
    val4[i] = digitalRead(p4);
    val5[i] = digitalRead(p5);
    val6[i] = digitalRead(p6);
//    val7[i] = digitalRead(p7);
//    val8[i] = digitalRead(p8);
//    val9[i] = digitalRead(p9);
    delayMicroseconds(10);
//    delay(10);
//    Serial.print(val1[i]); Serial.print(",");
//    Serial.print(val2[i]*2 ); Serial.print(",");
//    Serial.print(val3[i]   +3); Serial.print(",");
//    Serial.print(val4[i]*2 +3); Serial.print(",");
//    Serial.print(val5[i]   +3*2); Serial.print(",");
//    Serial.print(val6[i]*2 +3*2); Serial.println(",");
//    Serial.print(val7[i]   -4); Serial.print(",");
//    Serial.print(val8[i]*2 -4); Serial.print(",");
//    Serial.print(val9[i]*3 -4); Serial.println();
  }
  for (int i=0; i<N; i++){
    Serial.print(val1[i]); Serial.print(",");
    Serial.print(val2[i]*2); Serial.print(",");
    Serial.print(val3[i]   +3); Serial.print(",");
    Serial.print(val4[i]*2 +3); Serial.print(",");
    Serial.print(val5[i]   +3*2); Serial.print(",");
    Serial.print(val6[i]*3 +3*2); Serial.println();
  }
}
